import request from '@/utils/request'

// 查询会员列表列表
export function listVipList(query) {
  return request({
    url: '/jy/vipList/list',
    method: 'get',
    params: query
  })
}

// 查询会员列表详细
export function getVipList(id) {
  return request({
    url: '/jy/vipList/' + id,
    method: 'get'
  })
}

// 新增会员列表
export function addVipList(data) {
  return request({
    url: '/jy/vipList',
    method: 'post',
    data: data
  })
}

// 修改会员列表
export function updateVipList(data) {
  return request({
    url: '/jy/vipList',
    method: 'put',
    data: data
  })
}

// 删除会员列表
export function delVipList(id) {
  return request({
    url: '/jy/vipList/' + id,
    method: 'delete'
  })
}

//根据会员等级查询每个等级下所有会员消费情况
export function getVipConsumptionByGrade() {
  return request({
    url: '/jy/vipList/vipConsumptionByGrade',
    method: 'get'
  })
}
